package com.zxdmy.excite.system.entity.search;

import cn.hutool.core.date.DateUnit;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class DocEntity {

    private String code;

    private String title;

    private String content;

    private String abstracts;

    private Date upDate;

    private String updateStr;

    public DocEntity(String code, String title, String content, String abstracts, Date upDate) {
        this.code = code;
        this.title = title;
        this.content = content;
        this.abstracts = abstracts;
        this.upDate = upDate;
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        this.updateStr = simpleDateFormat.format(upDate);
    }
}
